use "UT10p_VoterValidation.dta"hist yhat_dem2010 if (dem == 1 | unaf == 1) & respond_2nd == 1hist yhat_rep2010 if (rep == 1 | unaf == 1) & respond_gop == 1hist yhat_dem2010 if prim10 == 1 & (dem == 1 | unaf == 1)hist yhat_rep2010 if prim10 == 1 & (rep == 1 | unaf == 1)xtile dem_decile=yhat_dem2010, nquantiles(100)xtile rep_decile=yhat_rep2010, nquantiles(100)bys dem_decile: egen mean_prob_dem = mean(yhat_dem2010)bys rep_decile: egen mean_prob_rep = mean(yhat_rep2010)bys dem_decile: egen mean_turnout_dem = mean(prim10)bys rep_decile: egen mean_turnout_rep = mean(prim10)gen difference_dem = abs(mean_prob_dem - mean_turnout_dem)gen difference_rep = abs(mean_prob_rep - mean_turnout_rep)bys dem_decile: gen N=_n==1bys rep_decile: gen M=_n==1egen wae_dem = total(difference_dem) if N==1replace wae_dem = wae_dem / 100egen wae_rep = total(difference_rep) if M==1replace wae_rep = wae_rep / 100sort wae_dem wae_repbrowse wae_dem wae_rep